package com.gxuwz.com_property.user.service.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxuwz.com_property.user.dto.UserDto;
import com.gxuwz.com_property.user.mapper.UserMapper;
import com.gxuwz.com_property.user.pojo.User;
import com.gxuwz.com_property.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Component;

import javax.transaction.Transactional;
import java.util.List;

@Component
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public Boolean addUserInfo(User user) {
        return this.userMapper.addUserInfo(user);
    }

    @Override
    public Boolean updateUserInfo(User user) {
        return this.userMapper.updateUserInfo(user);
    }

    @Override
    public Boolean delectUserById(String account) {
        return this.userMapper.delectUserById(account);
    }

    @Override
    public User selectUsersById(String account) {
        return this.userMapper.selectUsersById(account);
    }
    /**
     * 使用插件
     * */
    @Override
    public IPage<User> selectUsersByPage(Page<User> page, UserDto userDto) {
        return userMapper.selectUsersByPage(page, userDto);
    }
}
